<?php
class RegisterAction extends Action {
	public function register() {
		global $param;
		$params = $param->getParams ();
		// global $cookieTools;
		// $qiaoba = $cookieTools->getCookie('qiaoba');
		// $this->smarty->assign("qiaoba",$qiaoba);
		tsLoad ( '/manage/busi/SysUserBusi.class.php' );
		$sysUserBusi = new SysUserBusi ();
		
		$menus = $sysUserBusi->queryUserVisitAllMenus ( $params );
		
		$sysUserBusi->addUser ( $params );
		
		$this->smarty->assign ( "menu", $menus );
		$this->assign ( "smarty", '/manage/page/register/register.html' );
		
		return $this->SMARTY;
	}
	
	public function registerGeneralUser() {
		global $param;
		$params = $param->getParams ();
		tsLoad ( '/manage/busi/UserBusi.class.php' );
		$userBusi = new UserBusi();
		$this->assign ( "result",  $userBusi->addUser($params));
		return $this->JSON;
	}
}
?>